import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 关闭生成模式下产生提示
Vue.config.productionTip = false;

// axios
import axios from 'axios'
import VueAxios from './plugins/VueAxios'
Vue.use(VueAxios, axios)

// element ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI, {size: 'mini'});

// babel
import 'babel-polyfill'

// lodash
import lodash from 'lodash'

Vue._ = lodash;
Object.defineProperties(Vue.prototype, {_: {get() {return lodash}}});

// 全局事件总线
Vue.prototype.$bus = new Vue();

import api from '@/api/index'
Object.defineProperties(Vue.prototype, {$api: {get() {return api}}});

// 插件
import plugin01 from './plugins/plugin01'
import plugin02 from './plugins/plugin02'
import VueStorage from './plugins/VueStorage'
Vue.use(plugin01,{key1:'value1'});
Vue.use(plugin02);
Vue.use(VueStorage);

// 组件扩展
import ExtSelect from './components/ExtSelect'
Vue.component('ext-select',ExtSelect);

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
